package sms.ui.chengji;

import sms.dao.ChengJiDao;
import sms.entry.ChengJi;
import sms.entry.KeCheng;
import sms.entry.XueSheng;
import sms.ui.ChengJiGuanLi;
import sms.ui.KeChenGuanLi;

import java.util.Scanner;

public class ChengJiTianJia {
    private static  ChengJiDao chengJiDao = new ChengJiDao();
    public static  void show(){
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入要添加成绩的学生姓名：");
        String  name = sc.next();
        System.out.println("请输入要添加成绩的考试科目：");
        String  km = sc.next();
        System.out.println("请输入要添加的考试分数：");
        double fenshu = sc.nextDouble();
        XueSheng xueSheng = new XueSheng(name);
        KeCheng keCheng = new KeCheng(km);
        ChengJi chengJi = new ChengJi(fenshu);
        chengJiDao.save(xueSheng,keCheng,chengJi);
        ChengJiGuanLi.show();
    }
}
